package com.teacher.pc.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.teacher.common.CommonResult;
import com.teacher.pojo.dto.moraleducation.MoralEducationGetDto;
import com.teacher.pojo.vo.moraleducation.MoralEducationGetVo;
import com.teacher.service.IMoralEducationService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 德育素质表 前端控制器
 * </p>
 *
 * @author zfm
 * @since 2021-08-03
 */
@RestController
@RequestMapping("/pc/moral-education")
public class MoralEducationController {

    @Autowired
    private IMoralEducationService iMoralEducationService;

    /**
     * 查询德育素质表
     *
     * @param dto
     * @return
     */
    @GetMapping
    @PreAuthorize("hasAuthority('moralEducation_get')")
    @ApiOperation("查询德育素质表 moralEducation_get")
    public CommonResult<IPage<MoralEducationGetVo>> getPage(MoralEducationGetDto dto) {
        return iMoralEducationService.getPage(dto);
    }

}

